<%@ taglib prefix="jca"
	uri="http://www.ptc.com/windchill/taglib/components"%>
<%@ include file="/netmarkets/jsp/components/beginWizard.jspf"%>

<jca:wizard buttonList="NoStepsWizardButtons"
	helpSelectorKey="baseline.addToHelp">
	<jca:wizardStep action="addToBaselineStep" type="baseline" />
</jca:wizard>

<input type="hidden" name="wizardActionClass"
	value="com.ptc.windchill.enterprise.baseline.forms.AddToBaselineFormProcessor">
<input type="hidden" name="wizardActionMethod" value="execute">
<input value="addToBaseline" name="addToBaseline_flag" type="hidden" />
<script Language="JavaScript">
	validateCreateLocation = function() {
		return true;
	}

	function user_validate() {
		var leftPaneOccupants = /doc\.WTDocument|epm\.EPMDocument|part\.WTPart/;
		var wizardSelectedObject = document.getElementById("addRows_baselineMembersNPATable").value;
		var wizardSelectedOids= wizardSelectedObject.split("#");
		for ( var i = 0; i < wizardSelectedOids.length; i++) {
			var wizardSelectedOid = wizardSelectedOids[i];
			if(wizardSelectedOid){
				if(!wizardSelectedOid.match(leftPaneOccupants)){
					JCAAlert("ext.acae2.baseline.resource.BaselineActionResource.BASELINEABLE_TYPE_ERROR");
					return false;
				}
			}
			
		}
		var flag = PTC.validation
				.callAJAXValidation('BaselineableStateValidator');
		return flag;
	}

	setUserSubmitFunction(user_validate);
</script>

<%@ include file="/netmarkets/jsp/util/end.jspf"%>
